//
//  BaseViewController.h
//  KuaiTu
//
//  Created by 江伟 on 2018/9/17.
//  Copyright © 2018年 WeiJiang. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIScrollView+EmptyDataSet.h"

@interface BaseViewController : UIViewController<UITableViewDelegate,UIScrollViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource,DZNEmptyDataSetDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) UIScrollView *scroView;
@property (nonatomic,strong) UICollectionView *collectionView;

/// 隐藏导航栏
@property (nonatomic,assign) BOOL isHiddenNav;

/// 是否正在加载网络...
@property (nonatomic,assign) BOOL isLoading;
/// 空数据占位图
@property (nonatomic,strong) UIImage *emptyImg;
/// 空数据占位文字
@property (nonatomic,strong) NSString *emptyTitle;

// MARK: -- 子类实现
- (void)setupViews;
- (void)loadData;
- (void)setupRefresh;
- (void)endRefresh;

/**
 设置导航栏左边按钮的文字
 */
- (void)setNavLeftBtnWithTitle:(NSString*)title;

/**
 设置导航栏右边按钮的文字
 */
- (void)setNavRightBtnWithTitle:(NSString*)title;

/**
 设置导航栏右边按钮的图标
 */
- (void)setNavRightBtnWithImageName:(NSString*)imageName;

/**
 设置导航栏左边按钮的图标
 */
- (void)setNavLeftBtnWithImageName:(NSString*)imageName;

/**
 右边有两个按钮
 设置导航栏右边按钮的图标
 
 imageName1  是最右面的
 
 */
- (void)setNavRightTwoBtnsWithImageName1:(NSString*)imageName1 andName2:(NSString*)imageName2;

///点击左边导航栏按钮
- (void)onTapNavLeftBtn;
///点击右边导航栏按钮
- (void)onTapNavRightBtn;
///点击右边导航栏第一个按钮
- (void)imageName1Click;
///点击右边导航栏第二个按钮
- (void)imageName2Click;

- (void)back;
@end
